Document! X 2019
Building from Command Line, MSBUILD or Tfs / Building with MSBUILD
In This Topic
    Building with MSBUILD
    In This Topic

    Document! X includes a custom MSBUILD task which can be used to integrate the build of documentation with your MSBUILD based build process.

    MSBUILD Task Assembly Location

    The Document! X 2019 MSBUILD Task assembly file is named Innovasys.DocumentX.Build.dll and can be found in a \bin sub-directory below the Document! X installation path. The default bin path is c:\Program Files\Innovasys\DocumentX2019\bin\ .

    The MSBUILD Task Assembly requires other Document! X assemblies and should not be moved from the installation path.

    Builds executed using the MSBUILD task require a full installation of Document! X. If you are integrating with a build on a build server, you must install a licensed copy of Document! X on the build server.

    Integrating the custom MSBUILD task

    To integrate the build of a Document! X project with your MSBUILD process, follow these steps:

    1. Open your MSBUILD project file (e.g. .proj, .vbproj, .csproj file) in notepad;
      The project file is actually an MSBUILD Xml file that you will edit to add Document! X to the build tasks. For more information on MSBUILD, see the MSBUILD documentation on MSDN.
    2. Add references to the MSBUILD task assembly in the file, as below:
      <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
        <PropertyGroup>
          ...
        </PropertyGroup>
        ...
        <ItemGroup>
          ...
        </ItemGroup>
        <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
        <UsingTask AssemblyFile="[BinPath]\Innovasys.DocumentX.Build.dll" TaskName="ProjectBuildTask" />
        <Target Name="GenerateDocumentation" Condition=" '$(Configuration)' == 'Release' ">
          <Innovasys.DocumentX.Build.ProjectBuildTask ProjectFileName="documentation\documentation.dxp"/>
        </Target>
      </Project>
    3. Replace [BinPath] in the sample above with the location of the assembly containing the MSBUILD task, outlined in the "MSBUILD Task Assembly Location" section earlier in this topic.
    4. Replace the ProjectFileName attribute value in the sample above with the location of your Document! X 2019 project file - either a full path and filename or a path relative to the MSBUILD project file.
    5. If required, you can also specify a BuildConfigurationName attribute to identify a specific saved Build Configuration to build. If no BuildConfigurationName is specified, the first Build Profile will be built. Example of Task Xml specifying a Build Configuration:
       
      <Innovasys.DocumentX.Build.ProjectBuildTask
                      ProjectFileName="documentation\documentation.dxp"
                      BuildConfigurationName="MyBuildConfigurationName"/>
    See Also